﻿<%@ Page Language="C#" MasterPageFile="~/masterpageuser.master" AutoEventWireup="true" CodeFile="CustommerInfo.aspx.cs" Inherits="CustommerInfo" Title="Management Infomation" %>
<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="asp" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolderMain" Runat="Server">    

    <div class="conten-header">Account infomation</div>
    <div class="conten-underline"></div>
  

     <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <asp:UpdateProgress ID="UpdateProgress1" runat="server" AssociatedUpdatePanelID="UpdatePanel1">
        <ProgressTemplate>
        <asp:Image ID="imgXuLy" ImageUrl="~/images/icon_progress.gif" runat="server" 
                Width="25px">
            </asp:Image>
            <asp:Label ID="lblXuLy" runat="server" BackColor="#FFFF99" Text="Đang xử lý..."></asp:Label>
        </ProgressTemplate>            
    </asp:UpdateProgress>

    <asp:UpdatePanel ID="UpdatePanel1" runat="server">

    <ContentTemplate> 
    <div class="divchucnang1">
    
        <asp:LinkButton ID="LinkbtnTaiKhoan" runat="server" CausesValidation="False" class = "Infomation"
            onclick="LinkbtnTaiKhoan_Click">Infomation</asp:LinkButton>
        || <asp:LinkButton ID="LinkbtnDoiMatKhau" runat="server" class = "Infomation"
            CausesValidation="False" onclick="LinkbtnDoiMatKhau_Click">Change password</asp:LinkButton>
        || <asp:LinkButton ID="LinkbtnGiaoDich" runat="server" CausesValidation="False" class = "Infomation"
            onclick="LinkbtnGiaoDich_Click">History</asp:LinkButton>
    
    </div>  
    <div class="divchucnang2">
       <asp:Panel ID="PanelTaiKhoan" runat="server" GroupingText="Account">        
       <table >
        <tr>
            <td class="tdthongtin">
                &nbsp;</td>
            <td class="tdnoidung">
                <asp:Label ID="lblThongBao1" CssClass="lbl_thongbao" runat="server"></asp:Label>
            </td>
        </tr>
           <tr>
               <td class="tdthongtin">
                   Mã khách hàng:</td>
               <td class="tdnoidung">
                   <asp:TextBox ID="txtMaKH" runat="server" Enabled="False" style="width:200px"></asp:TextBox>
               </td>
           </tr>
           <tr>
               <td class="tdthongtin">
                   Login Name:</td>
               <td class="tdnoidung">
                   <asp:TextBox ID="txtTenDN" runat="server" Enabled="False" style="width:200px"></asp:TextBox>
                   <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" 
                       ControlToValidate="txtTenDN" ErrorMessage="*"></asp:RequiredFieldValidator>
               </td>
           </tr>
        <tr>
            <td class="tdthongtin">
                Email:</td>
            <td class="tdnoidung">
                <asp:TextBox ID="txtEmail" runat="server" Enabled="false" style="width:200px"></asp:TextBox>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server" 
                    ControlToValidate="txtEmail" ErrorMessage="*"></asp:RequiredFieldValidator>
                <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" 
                    ControlToValidate="txtEmail" ErrorMessage="Nhập đúng email" 
                    ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*"></asp:RegularExpressionValidator>
            </td>
        </tr>
        <tr>
            <td class="tdthongtin">
                Full name:</td>
            <td class="tdnoidung">
                <asp:TextBox ID="txtHoTen" runat="server" style="width:200px"></asp:TextBox>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator7" runat="server" 
                    ControlToValidate="txtHoTen" ErrorMessage="*"></asp:RequiredFieldValidator>
            </td>
        </tr>
        <tr>
            <td class="tdthongtin">
                Phone number:</td>
            <td class="tdnoidung">
                <asp:TextBox ID="txtDienThoai" runat="server" style="width:200px"></asp:TextBox>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator8" runat="server" 
                    ControlToValidate="txtDienThoai" ErrorMessage="*"></asp:RequiredFieldValidator>
            </td>
        </tr>
        <tr>
            <td class="tdthongtin">
                Address:</td>
            <td class="tdnoidung">
                <asp:TextBox TextMode="MultiLine" Width="250px" ID="txtDiaChi" runat="server"></asp:TextBox>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator9" runat="server" 
                    ControlToValidate="txtDiaChi" ErrorMessage="*"></asp:RequiredFieldValidator>
            </td>
       
       
        <tr>
            <td class="tdthongtin">
                Sex:</td>
            <td class="tdnoidung">
               <asp:RadioButtonList ID="RadioBtnNgaySinh" runat="server" 
                            RepeatDirection="Horizontal">
                            <asp:ListItem Selected="True">Male</asp:ListItem>
                            <asp:ListItem Value="Nu">Female</asp:ListItem>
                        </asp:RadioButtonList></td>
        </tr>
        <tr>
            <td class="tdthongtin">
                Birthday:</td>
            <td class="tdnoidung">
                Day<asp:DropDownList ID="DropNgay" runat="server">
                    <asp:ListItem>01</asp:ListItem>
                    <asp:ListItem>02</asp:ListItem>
                    <asp:ListItem>03</asp:ListItem>
                    <asp:ListItem>04</asp:ListItem>
                    <asp:ListItem>05</asp:ListItem>
                    <asp:ListItem>06</asp:ListItem>
                    <asp:ListItem>07</asp:ListItem>
                    <asp:ListItem>08</asp:ListItem>
                    <asp:ListItem>09</asp:ListItem>
                    <asp:ListItem>10</asp:ListItem>
                    <asp:ListItem>11</asp:ListItem>
                    <asp:ListItem>12</asp:ListItem>
                    <asp:ListItem>13</asp:ListItem>
                    <asp:ListItem>14</asp:ListItem>
                    <asp:ListItem>15</asp:ListItem>
                    <asp:ListItem>16</asp:ListItem>
                    <asp:ListItem>17</asp:ListItem>
                    <asp:ListItem>18</asp:ListItem>
                    <asp:ListItem>19</asp:ListItem>
                    <asp:ListItem>20</asp:ListItem>
                    <asp:ListItem>21</asp:ListItem>
                    <asp:ListItem>22</asp:ListItem>
                    <asp:ListItem>23</asp:ListItem>
                    <asp:ListItem>24</asp:ListItem>
                    <asp:ListItem>25</asp:ListItem>
                    <asp:ListItem>26</asp:ListItem>
                    <asp:ListItem>27</asp:ListItem>
                    <asp:ListItem>28</asp:ListItem>
                    <asp:ListItem>29</asp:ListItem>
                    <asp:ListItem>30</asp:ListItem>
                    <asp:ListItem>31</asp:ListItem>
                </asp:DropDownList>
                Month<asp:DropDownList ID="DropThang" runat="server">
                    <asp:ListItem>01</asp:ListItem>
                    <asp:ListItem>02</asp:ListItem>
                    <asp:ListItem>03</asp:ListItem>
                    <asp:ListItem>04</asp:ListItem>
                    <asp:ListItem>05</asp:ListItem>
                    <asp:ListItem>06</asp:ListItem>
                    <asp:ListItem>07</asp:ListItem>
                    <asp:ListItem>08</asp:ListItem>
                    <asp:ListItem>09</asp:ListItem>
                    <asp:ListItem>10</asp:ListItem>
                    <asp:ListItem>11</asp:ListItem>
                    <asp:ListItem>12</asp:ListItem>
                </asp:DropDownList>
                Year<asp:TextBox ID="txtNam" CssClass="clnam" runat="server" Width="60px"></asp:TextBox>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator10" runat="server" 
                    ControlToValidate="txtNam" ErrorMessage="*"></asp:RequiredFieldValidator>
                <asp:RangeValidator ID="RangeValidator1" runat="server" 
                    ControlToValidate="txtNam" ErrorMessage="năm sinh không hợp lệ" 
                    MaximumValue="2011" MinimumValue="1900" Type="Integer"></asp:RangeValidator>
            </td>
        </tr>
       
        <tr>
            <td class="tdthongtin">
                Sercurity key:</td>
            <td class="tdnoidung">
            <fieldset style="width:200px;">
            <legend class="legend-admin">Random question</legend>
            <table cellspacing="1" class="tblcauhoi">
                <tr>
                    <td>
                        <asp:Label ID="lblcauhoi" runat="server"></asp:Label>
                        (Digit only)</td>
                </tr>
                <tr>
                    <td>
                        <asp:TextBox ID="txtTraLoi" runat="server" Width="100px"></asp:TextBox>
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" 
                            ControlToValidate="txtTraLoi" ErrorMessage="*"></asp:RequiredFieldValidator>
                    </td>
                </tr>
            </table>
            </fieldset>
            </td>
        </tr>
        <tr>
            <td class="tdthongtin">
                &nbsp;</td>
            <td class="tdnoidung">
                <asp:Button ID="btnCapNhat" runat="server" Text="Update" Width="80px" 
                    onclick="btnCapNhat_Click" />
                <asp:Button ID="btnTuBo" runat="server" Text="Cancel" CausesValidation="False" 
                    Width="80px" onclick="btnTuBo_Click" />
            </td>
        </tr>
        </table>
       </asp:Panel>
        <asp:Panel ID="PanelDoiMatKhau" runat="server" Visible="False" 
            GroupingText="Change password" Width="730px">
        <table cellspacing="1" class="tbldangnhap">
            <tr>
                <td class="tdthongtin">                
                    &nbsp;</td>
                <td class="tdnoidung">
                    <asp:Label ID="lblThongBao2" CssClass="lbl_thongbao" runat="server"></asp:Label>
                </td>
            </tr>
            <tr>
                <td class="tdthongtin">                
                    Old password:</td>
                <td class="tdnoidung">
                    <asp:TextBox ID="txtMatKhauCu" runat="server" Width="150px" TextMode="Password"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td class="tdthongtin">                
                    New password:</td>
                <td class="tdnoidung">
                    <asp:TextBox ID="txtMatKhauMoi" runat="server" Width="150px" 
                        TextMode="Password"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td class="tdthongtin">
                    Confirm password:</td>
                <td class="tdnoidung">
                    <asp:TextBox ID="txtReMatKhauMoi" runat="server" Width="150px" 
                        TextMode="Password"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td class="tdthongtin">
                    &nbsp;</td>
                <td class="tdnoidung">
                    <asp:Button ID="btnThayDoi" runat="server" CausesValidation="False" 
                        onclick="btnThayDoi_Click" Text="Update" />
                    <asp:Button ID="btnTuChoi" runat="server" CausesValidation="False" 
                        onclick="btnTuChoi_Click" Text="Cancel" />
                </td>
            </tr>
        </table>
        </asp:Panel>
        <asp:Panel ID="PanelGiaoDich" runat="server" Visible="False" Width="730px" GroupingText="History">
            <asp:GridView ID="GridViewLichSuGiaoDich" runat="server" Width="100%" 
                DataKeyNames="Id" AutoGenerateColumns="False" 
                onrowcommand="GridViewLichSuGiaoDich_RowCommand" AllowPaging="True" 
                onpageindexchanging="GridViewLichSuGiaoDich_PageIndexChanging" 
                PageSize="20">
                <Columns>
                    <asp:BoundField DataField="Id" HeaderText="OrderId" >
                        <ItemStyle Width="70px" />
                    </asp:BoundField>
                    <%--<asp:BoundField DataField="FullName" HeaderText="Full name" />--%>
                    <%--<asp:BoundField DataField="Quantity" HeaderText="Quantities" >
                        <ItemStyle Width="110px" />
                    </asp:BoundField>--%>
                    <asp:BoundField DataField="TotalMoney" DataFormatString="{0:0,0}" 
                        HeaderText="Grand Total" >
                        <ItemStyle Width="110px" />
                    </asp:BoundField>
                    <asp:BoundField DataField="Created" DataFormatString="{0:dd/MM/yyyy-h:mm}" 
                        HeaderText="Created" >
                        <ItemStyle Width="110px" />
                    </asp:BoundField>
                     <asp:BoundField DataField="StatusName" HeaderText="Status">
                         <ItemStyle Width="110px" />
                    </asp:BoundField>

                     <asp:TemplateField HeaderText="View">
                              <ItemStyle HorizontalAlign="Center" Width="30px" />
                            <ItemTemplate> 
                                <asp:LinkButton ID="LbtnView" CommandArgument='<%#Eval("OrderId") %>' ToolTip="Oder detail"  runat="server" CommandName="ViewOrder" CausesValidation="false">
                                    <img src="images/icons/icon_view.jpg" border="0px" alt="View order"/>
                                </asp:LinkButton>
                            </ItemTemplate>
                     </asp:TemplateField>
                     <%--<asp:TemplateField>
                      <ItemStyle HorizontalAlign="Center" Width="30px" />
                    <ItemTemplate> 
                        <asp:LinkButton ID="LbtnPrint" CommandArgument='<%#Eval("OrderId") %>' ToolTip="In hóa đơn"  runat="server" CommandName="PrintOrder" CausesValidation="false">
                            <img src="ICON/icon_print.bmp" border="0px"/>
                        </asp:LinkButton>
                    </ItemTemplate>
                    </asp:TemplateField>--%>
                </Columns>
            </asp:GridView>
        </asp:Panel>
        <asp:Panel ID="PanelChiTiet" runat="server" Visible="false" Width="730px">
        <table cellpadding="0" cellspacing="0" width="720px">
        <%--    <tr>
                <td width="360px" class="bg_title_td" colspan="2">                
                    Ngày tạo hóa đơn:                
                    <asp:Label ID="lblNgayTaoHD" runat="server"></asp:Label>
                    </td>              
                <td width="360px" colspan="2" class="bg_title_td">
                    Tổng hóa đơn:
                    <asp:Label ID="lblTongHD" runat="server"></asp:Label>
                </td>                
            </tr>
            <tr>
               <td width="360px" colspan="2" class="bg_title_td" style="font-weight:bold; border-right:solid 1px Black;">
                Địa chỉ thanh toán
                </td>
                <td width="360px" colspan="2" class="bg_title_td" style="font-weight:bold;">
                Địa chỉ nhận hàng
                </td>               
            </tr>
            <tr>
                <td width="100px" style="text-align:left; padding-left:4px;">
                    Họ tên:</td>
                <td width="260px">
                    <asp:Label ID="T_HoTen" runat="server"></asp:Label>
                </td>
                <td width="100px" style="text-align:left; padding-left:4px;">
                    Họ tên:</td>
                <td width="260px">
                    <asp:Label ID="N_HoTen" runat="server"></asp:Label>
                </td>
            </tr>
            <tr>
                <td style="text-align:left; padding-left:4px;" width="100px">
                    Giới tính:</td>
                <td width="260px">
                    <asp:Label ID="T_GioiTinh" runat="server"></asp:Label>
                </td>
                <td style="text-align:left; padding-left:4px;" width="100px">
                    Giới tính:</td>
                <td width="260px">
                    <asp:Label ID="N_GioiTinh" runat="server"></asp:Label>
                </td>
            </tr>
            <tr>
                <td style="text-align:left; padding-left:4px;" width="100px">
                    Công ty:</td>
                <td width="260px">
                    <asp:Label ID="T_CongTy" runat="server"></asp:Label>
                </td>
                <td style="text-align:left; padding-left:4px;" width="100px">
                    Công ty:</td>
                <td width="260px">
                    <asp:Label ID="N_CongTy" runat="server"></asp:Label>
                </td>
            </tr>
            <tr>
                <td style="text-align:left; padding-left:4px;" width="100px">
                    Địa chỉ:</td>
                <td width="260px">
                    <asp:Label ID="T_DiaChi" runat="server"></asp:Label>
                </td>
                <td style="text-align:left; padding-left:4px;" width="100px">
                    Địa chỉ:</td>
                <td width="260px">
                    <asp:Label ID="N_DiaChi" runat="server"></asp:Label>
                </td>
            </tr>
            <tr>
                <td style="text-align:left; padding-left:4px;" width="100px">
                    Điện thoại</td>
                <td width="260px">
                    <asp:Label ID="T_DienThoai" runat="server"></asp:Label>
                </td>
                <td style="text-align:left; padding-left:4px;" width="100px">
                    Điện thoại</td>
                <td width="260px">
                    <asp:Label ID="N_DienThoai" runat="server"></asp:Label>
                </td>
            </tr>
            <tr>
                <td style="text-align:left; padding-left:4px;" width="100px">
                    Thành phố:</td>
                <td width="260px">
                    <asp:Label ID="T_ThanhPho" runat="server"></asp:Label>
                </td>
                <td style="text-align:left; padding-left:4px;" width="100px">
                    Thành phố:</td>
                <td width="260px">
                    <asp:Label ID="N_ThanhPho" runat="server"></asp:Label>
                </td>
            </tr>
            <tr>
                <td style="text-align:left; padding-left:4px;" width="100px">
                    Tỉnh:</td>
                <td width="260px">
                    <asp:Label ID="T_Tinh" runat="server"></asp:Label>
                </td>
                <td style="text-align:left; padding-left:4px;" width="100px">
                    Tỉnh:</td>
                <td width="260px">
                    <asp:Label ID="N_Tinh" runat="server"></asp:Label>
                </td>
            </tr>
            <tr>
                <td style="text-align:left; padding-left:4px;" width="100px">
                    Mã vùng:</td>
                <td width="260px">
                    <asp:Label ID="T_MaVung" runat="server"></asp:Label>
                </td>
                <td style="text-align:left; padding-left:4px;" width="100px">
                    Mã vùng:</td>
                <td width="260px">
                    <asp:Label ID="N_MaVung" runat="server"></asp:Label>
                </td>
            </tr>
            <tr>
                <td style="text-align:left; padding-left:4px;" width="100px">
                    Tên nước:</td>
                <td width="260px">
                    <asp:Label ID="T_TenNuoc" runat="server"></asp:Label>
                </td>
                <td style="text-align:left; padding-left:4px;" width="100px">
                    Tên nước:</td>
                <td width="260px">
                    <asp:Label ID="N_TenNuoc" runat="server"></asp:Label>
                </td>
            </tr>
            <tr>
                <td style="text-align:right; padding-right:5px; font-weight:bold; width: 360px;"  class="bg_title_td" 
                    colspan="2">
                    Phương thức thanh toán:</td>
                <td style="text-align:left; padding-left:5px; font-weight:bold; width: 360px;"  class="bg_title_td" 
                    colspan="2">
                    <asp:Label ID="lblPhuongThucTT" runat="server"></asp:Label>
                </td>
            </tr>           --%>
            <tr>
                <td style="text-align:left; padding-left:5px; font-weight:bold" colspan="4" class="bg_title_td">
                    Order detail</td>
            </tr>
            <tr>
                <td align="center" colspan="4" style="height: 19px">
                <asp:GridView ID="GridCart" runat="server" AutoGenerateColumns="False"
                        Width="720px" DataKeyNames="OrderId" 
                        ShowFooter="True">
                        <Columns>           
                            <asp:TemplateField HeaderText="Product name">
                                <ItemTemplate>                                   
                                    <asp:Label ID="lblTenSP" runat="server"  Text='<%# Eval("ProductName") %>'></asp:Label>                        
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="Price">
                                <ItemTemplate>
                                    <asp:Label ID="lblGiaTien" runat="server" Text='<%# Eval("Price","{0:0,0}") %>'></asp:Label>
                                </ItemTemplate>
                                <ItemStyle Width="100px" />
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="Quantities">
                                <FooterTemplate>
                                    Tổng tiền:
                                </FooterTemplate>
                                <ItemTemplate>
                                    <asp:Label ID="lblSoLuong" runat="server" Text='<%# Eval("Quantity") %>' ></asp:Label>                                   
                                </ItemTemplate>
                                <ItemStyle Width="80px" />
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="Amount">
                                <FooterTemplate>
                                    <asp:Label ID="lblTongTien" runat="server"></asp:Label>
                                </FooterTemplate>
                                <ItemTemplate>
                                    <asp:Label ID="lblThanhTien" runat="server" Text='<%# Eval("TotalMoney","{0:0,0}") %>'></asp:Label>
                                </ItemTemplate>
                                <ItemStyle Width="120px" />
                            </asp:TemplateField>                            
                        </Columns>
                    </asp:GridView>
                </td>
            </tr>
            <%--<tr>
                 <td style="text-align:right; padding-right:5px;" width="100px">
                    Yêu cầu HĐ:</td>
                <td width="260px">
                    <asp:Label ID="lblComment" runat="server"></asp:Label>
                </td>
                td style="text-align:right; padding-right:5px;" width="100px">
                    Tình trạng:</td>
                <td width="260px">
                    
                    <asp:Label ID="lblTinhTrangHD" runat="server"></asp:Label>
                    
                </td>-
            </tr>
            <tr>
                <td align="center" colspan="4">
                 <asp:LinkButton ID="lbtClose" runat="server" CausesValidation="False" 
                        onclick="lbtClose_Click">
                    <img border="0px" src="images/icon-return.jpg" /> <b>--Quay Lại--</b>
                 </asp:LinkButton>
                </td>
            </tr>--%>
        </table>
        </asp:Panel>
      </div>
     </ContentTemplate>
     </asp:UpdatePanel>


</asp:Content>

